
import AbsWindow from "../../framework/AbsWindow";
import { WindowName } from "../../framework/reflect/WindowName";
import GameWindow from "./GameWindow";
import SettlementWindow from "./SettlementWindow";
import Context from "../../framework/Context";
const { ccclass, property } = cc._decorator;
@ccclass
@WindowName("LoseWindow")
export default class LoseWindow extends AbsWindow {

    @property(cc.Node)
    private returnBtn: cc.Node = null

    public static sendData(data?:null): Promise<LoseWindow> {
        return Context.get().startWindow(LoseWindow).then(lose => {
            lose.initData(data);
            return Promise.resolve(lose)
        })
    }
    public initData(data) {
        if(data !=null)
        {

        }
    }
    public onStart() {
        this.setClickListener(this.returnBtn, this.onReturnBtn);
    }
    public listen(): string[] {
        return []
    }
    public handleMessage(message: string, args: any[]): boolean {
        switch (message) {
        }
        return false
    }
    private onReturnBtn() {
        this.context.closeWindow(LoseWindow);
        this.context.closeWindow(GameWindow);
    }
}